package cn.owng.server.common.generated.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 游戏记录
 * </p>
 *
 * @author baomidou
 * @since 2024-08-11
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("game_record")
public class GameRecord extends Model<GameRecord> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "game_record_id", type = IdType.ASSIGN_ID)
    private Long gameRecordId;

    /**
     * 游戏 ID
     */
    @TableField("game_id")
    private Long gameId;

    /**
     * 游戏服务器 ID
     */
    @TableField("game_service_id")
    private Long gameServiceId;

    /**
     * 创建游戏的用户 ID
     */
    @TableField("user_id")
    private String userId;

    /**
     * 记录的摘要数据
     */
    @TableField("summary")
    private String summary;

    /**
     * 开始时间
     */
    @TableField("date_started")
    private Date dateStarted;

    /**
     * 结束时间
     */
    @TableField("date_ended")
    private Date dateEnded;

    /**
     * 添加时间
     */
    @TableField("date_added")
    private Date dateAdded;

    /**
     * 详情ID
     */
    @TableField("game_record_detail_id")
    private Long gameRecordDetailId;

    @Override
    public Serializable pkVal() {
        return this.gameRecordId;
    }
}
